package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.Locator;
import com.xmtlxx.wms.domain.bo.LocatorBo;
import com.xmtlxx.wms.domain.vo.LocatorVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库位Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface LocatorMapper extends BaseMapperPlus<LocatorMapper, Locator, LocatorVo> {
    /**
     * 根据条件分页查询库位
     *
     * @param locator 库位
     * @return Page Locator
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "l.create_by"),
//        @DataColumn(key = "deptName", value = "s.dept_id"),
//        @DataColumn(key = "userName", value = "l.create_by")
//    })
    Page<LocatorVo> selectPageLocatorList(@Param("page") Page<Locator> page,@Param("locator") LocatorBo locator);

    /**
     * 查询库位列表
     *
     * @param locator 库位
     * @return 库位集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "l.create_by"),
//        @DataColumn(key = "deptName", value = "s.dept_id"),
//        @DataColumn(key = "userName", value = "l.create_by")
//    })
    List<LocatorVo> selectLocatorList(@Param("locator") LocatorBo locator);

    LocatorVo selectLocatorVoByID(String id);

}
